package com.region.plugin.proxy;

import com.region.plugin.Interceptor;

import java.util.List;

/**
 * @author 26225
 * @date 2024/9/7 12:30
 * @description
 */
public interface ProxyHandler {

    /**
     * Get the proxy object
     *
     * @param target      Proxied objects
     * @param classes     The implementation interface class of the object being proxied
     * @param interceptor Custom Interceptors
     * @return
     */
    Object createProxyInstance(Object target, Class<?>[] classes, Interceptor interceptor, Object[] args);

    /**
     * Generate a proxy object post complete processor
     *
     * @param target
     * @param interceptors
     * @param args
     */
    default void completeProxy(Object target, List<Interceptor> interceptors, Object[] args) {}
}
